<?php

/*
 * This file is part of the symfony package.
 * (c) Tuan Dinh Van <dinhtuan@it-uce.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * sfValidatorPass is an identity validator. It simply returns the value unmodified. 
 *
 * @package    symfony
 * @subpackage validator
 * @author     Tuan Dinh Van <dinhtuan@it-uce.com>
 * @version    SVN: $Id: sfValidatorInputCurrency.class.php 7902 2011-03-17 13:17:33Z fabien $
 */
class sfValidatorInputCurrency extends sfValidatorNumber
{
  /**
   * @see sfValidatorBase
   */
  protected function doClean($value)
  {
  	$value = str_replace(',','',$value);
  	$value = str_replace('.','',$value);
  	$value = str_replace(' ','',$value);
  	if($value == "") $value = 0;
  	return parent::doClean($value);
  }
}
